use system::{init, start};

mod controller;
mod entities;
mod facade;
mod middleware;
mod model;
mod provider;
mod router;
mod service;
mod system;
mod utils;
mod payload;

#[tokio::main]
async fn main() {
    // initilization
    init::sync();
    let r = init::async_init().await;
    if r.is_err(){
        println!("init async failed: {:?}",r.err().unwrap());
        return;
    }
    init::watch().await;
    // start
    start::hybrid().await;
}
